package com.office.forum.manage.article.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.office.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.office.common.annotation.Excel;

/**
 * 帖子对象 forum_posts
 * 
 * @author ruoyi
 * @date 2025-05-16
 */
public class ForumPosts extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
        private Long postId;

   /**帖子分类名**/
   @Excel(name = "分类名")
   private String  categoryName;

    /**帖子分类id*/
    @Excel(name = "帖子分类id")
    private Long  categoryId;

    /** 帖子名称 */
    @Excel(name = "帖子名称")
    private String title;

    /** sys_uesr的user_id 字段 */
    @Excel(name = "sys_uesr的user_id 字段")
    private Long userId;

    /** 发帖人名称 */
    @Excel(name = "发帖人名称")
    private String name;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String content;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")

    private Date createdAt;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long likes;

    /** 评论数量 */
    @Excel(name = "评论数量")
    private Long comments;

    /** 帖子状态1为已发布，0为草稿,-1为已删除 */
    @Excel(name = "帖子状态1为已发布，0为草稿,-1为已删除")
    private Long status;

    /** 最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 帖子封面图片URL */
    @Excel(name = "帖子封面图片URL")
    private String imageUrl;

    /** 帖子被浏览次数 */
    @Excel(name = "帖子被浏览次数")
    private Long viewCount;

    public void setPostId(Long postId) 
    {
        this.postId = postId;
    }

    public Long getPostId() 
    {
        return postId;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setLikes(Long likes) 
    {
        this.likes = likes;
    }

    public Long getLikes() 
    {
        return likes;
    }

    public void setComments(Long comments) 
    {
        this.comments = comments;
    }

    public Long getComments() 
    {
        return comments;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    public void setImageUrl(String imageUrl) 
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl() 
    {
        return imageUrl;
    }

    public void setViewCount(Long viewCount) 
    {
        this.viewCount = viewCount;
    }

    public Long getViewCount() 
    {
        return viewCount;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("postId", getPostId())
            .append("title", getTitle())
            .append("userId", getUserId())
            .append("name", getName())
            .append("content", getContent())
            .append("createdAt", getCreatedAt())
            .append("likes", getLikes())
            .append("comments", getComments())
            .append("remark", getRemark())
            .append("status", getStatus())
            .append("updatedAt", getUpdatedAt())
            .append("imageUrl", getImageUrl())
            .append("viewCount", getViewCount())
            .toString();
    }
}
